package com.itshidu.jiaowu.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itshidu.jiaowu.entity.Violate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author XiaZengming123
 * @since 2019-07-18
 */
@Mapper
public interface ViolateMapper extends BaseMapper<Violate> {

    @Select("select username from user where id=#{id}")
    String SelectNameById(Long id);

    @Select("select * from violate where student_id=#{id}")
    List<Violate> SelectBySId(Long id);

    @Select("select * from violate where handler_id=#{id}")
    List<Violate> SelectBySId2(Long id);



}
